package com.example.administrator.zhongyichou.fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.ListView;

import com.example.administrator.zhongyichou.adapter.WithdrawalsAdapter;
import com.example.administrator.zhongyichou.Bean.BaseEventBean;
import com.example.administrator.zhongyichou.base.BaseFragment;
import com.example.administrator.zhongyichou.base.MyApplication;
import com.example.administrator.zhongyichou.net.NetConfig;
import com.example.administrator.zhongyichou.net.core.HttpLoader;
import com.example.administrator.zhongyichou.net.core.RequestHttpLoader;
import com.example.administrator.zhongyichou.net.protocol.GsonBaseProtocol;
import com.example.administrator.zhongyichou.R;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 第五版新加
 * Created by lichenyu on 2017/11/20.
 * 描述：提现
 */

public class WithdrawalsFragment extends BaseFragment {
    @BindView(R.id.listview)
    ListView listview;
    @BindView(R.id.btn_withdrawals)
    Button btnWithdrawals;
    WithdrawalsAdapter adapter;
    private String infoID;

    @Override
    protected void responseData(GsonBaseProtocol mGsonBaseProtocal) {

    }

    @Override
    protected HttpLoader initHttpLoader() {
        infoID = getArguments().getString("info_id");
        RequestHttpLoader requestHttpLoader = new RequestHttpLoader(GsonBaseProtocol.class);
        Map<String, String> map = new HashMap<>();
        map.put("user_id", MyApplication.getUserID());
        map.put("info_id", infoID);
        map.put("record_type", "0");
        requestHttpLoader.setParams(NetConfig.RAISE_WALLET, map);
        return requestHttpLoader;
    }

    @Override
    protected boolean isRequestData() {
        return true;
    }

    @Override
    protected View initContentView() {
        View view = LayoutInflater.from(getActivity()).inflate(R.layout.withdrawals_fragment, null);
        ButterKnife.bind(this, view);
        adapter = new WithdrawalsAdapter(getContext(), new ArrayList());
        listview.setAdapter(adapter);
        return view;
    }

    @Override
    public boolean onEventBus(BaseEventBean baseEventBean) {

        return false;
    }

    @OnClick(R.id.btn_withdrawals)
    public void onViewClicked() {

    }
}
